package com.design.bridge;

import lombok.extern.slf4j.Slf4j;

import java.math.BigDecimal;

/**
 * @author ytj
 * @date 2024/11/27 16:33
 */
@Slf4j
public class WxPay extends IPay{

    public WxPay(IPayModel payModel){
        super(payModel);
    }

    @Override
    public void pay(String uid, String orderId, BigDecimal amount) {
        log.info("微信支付开始支付，userId:{},orderId:{},amount:{}",uid,orderId,amount);
        Boolean security = payModel.security(uid);
        if(!security){
            log.info("支付验证失败!");
        }
        log.info("微信支付验证成功，扣款成功,userId:{},orderId:{},amount:{}",uid,orderId,amount);
    }
}
